package p270jp.pxv.android.comment.presentation.flux;

import androidx.lifecycle.AbstractC0720j0;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MediatorLiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.SavedStateHandle;
import androidx.lifecycle.Transformations;
import p270jp.pxv.android.comment.domain.model.CommentInputState;
import p270jp.pxv.android.comment.domain.model.CommentType;
import p285kf.CommentInputControlEvent;
import p285kf.CommentInputEvent;
import p325m0.MutabilityOwnership;
import p350mp.Timber;
import p445qf.C5830a;
import p467rd.subscribers;
import p493sf.AbstractC6047g;
import p671zc.CompositeDisposable;

/* compiled from: CommentInputStore.kt */
/* renamed from: jp.pxv.android.comment.presentation.flux.CommentInputStore */
/* loaded from: classes2.dex */
public final class CommentInputStore extends AbstractC0720j0 {

    /* renamed from: c */
    public final SavedStateHandle f18915c;

    /* renamed from: d */
    public final CompositeDisposable f18916d;

    /* renamed from: e */
    public final MutableLiveData<Boolean> f18917e;

    /* renamed from: f */
    public final LiveData<Boolean> f18918f;

    /* renamed from: g */
    public final MutableLiveData<C5830a<CommentInputEvent>> f18919g;

    /* renamed from: h */
    public final LiveData<C5830a<CommentInputEvent>> f18920h;

    /* renamed from: i */
    public final MutableLiveData<C5830a<CommentInputControlEvent>> f18921i;

    /* renamed from: j */
    public final LiveData<C5830a<CommentInputControlEvent>> f18922j;

    /* renamed from: k */
    public final LiveData<CommentType> f18923k;

    /* renamed from: l */
    public final LiveData<CommentInputState> f18924l;

    /* renamed from: m */
    public final LiveData<Integer> f18925m;

    public CommentInputStore(AbstractC6047g gVar, SavedStateHandle f0Var) {
        MutabilityOwnership.m3745m(gVar, "dispatcher");
        MutabilityOwnership.m3745m(f0Var, "savedStateHandle");
        CompositeDisposable aVar = new CompositeDisposable();
        this.f18915c = f0Var;
        this.f18916d = aVar;
        MutableLiveData<Boolean> xVar = new MutableLiveData<>(Boolean.FALSE);
        this.f18917e = xVar;
        MediatorLiveData vVar = new MediatorLiveData();
        vVar.m11033o(xVar, new Transformations(vVar));
        this.f18918f = vVar;
        MutableLiveData<C5830a<CommentInputEvent>> xVar2 = new MutableLiveData<>();
        this.f18919g = xVar2;
        this.f18920h = xVar2;
        MutableLiveData<C5830a<CommentInputControlEvent>> xVar3 = new MutableLiveData<>();
        this.f18921i = xVar3;
        this.f18922j = xVar3;
        this.f18923k = f0Var.m11068a("saved_state_key_comment_type");
        this.f18924l = f0Var.m11068a("saved_state_key_input_state");
        this.f18925m = f0Var.m11068a("saved_state_key_selected_index");
        aVar.mo82c(subscribers.m2589g(gVar.mo2435a(), null, null, new p285kf.CommentInputStore(this), 3));
    }

    /* renamed from: d */
    public static final void m4630d(CommentInputStore commentInputStore, CommentInputEvent eVar) {
        commentInputStore.f18919g.m11032n(new C5830a<>(eVar));
    }

    /* renamed from: e */
    public static final void m4629e(CommentInputStore commentInputStore, CommentInputControlEvent dVar) {
        commentInputStore.f18921i.m11032n(new C5830a<>(dVar));
    }

    @Override // androidx.lifecycle.AbstractC0720j0
    /* renamed from: b */
    public void mo315b() {
        this.f18916d.m80f();
        Timber.f23100a.mo3516n("debug onCleared", new Object[0]);
    }
}
